
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录界面</title>
    <link rel="stylesheet" type="text/css" href="/sharing/css/styles.css">
    <script src="/sharing/js/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="/sharing/js/placeholderfriend.js" type="text/javascript"></script>
    <script src="/sharing/js/jquery.cookie.js" type="text/javascript"></script>

    <script type="text/javascript">

        $(document).ready(function (){
            if($("#login-username").html()!=''&&$("#login-username").html()!=undefined) {
                $("#login-username").hide()
                window.location.href = "${createLink(absolute:true,controller: 'login',action: 'index')}";
            }
        })

    </script>
</head>
<body>
<div class="login-content">
    <sec:ifLoggedIn>
        <div id="login-username"> <sec:username/> </div>
    </sec:ifLoggedIn>
    <sec:ifNotLoggedIn>

        <i class="top20 icon-font-log2"> <%=errors%> </i>
    </sec:ifNotLoggedIn>
    <div class="error" style="display:none;">
        <i class="icon-error"></i>
        帐号密码错误，请重新输入！
    </div>

<div class="htmleaf-container">
    <div class="wrapper">
        <div class="container">
            <h1>Welcome</h1>
            <g:form class="form" controller="login" action="login" useToken="true" method="post">
                <input name="username" type="text" placeholder="Username">
                <input name="password" type="password" placeholder="Password">
                <button type="submit" id="login-button">Login</button>
            </g:form>
        </div>

        <ul class="bg-bubbles">
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
        </ul>
    </div>
</div>
</body>
</html>
